package com.lin.controller.Client;

import com.lin.response.CommonResp;
import com.lin.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/client/user")
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("/person")
    public CommonResp person(@RequestParam String name){
        return userService.person(name);
    }

    @GetMapping("/recharge")
    public CommonResp recharge(@RequestParam String name,@RequestParam Integer money){
        return userService.recharge(name,money);
    }

}
